using System;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace TicTacToeX {
	public class TicTacToe : Game {
		
		public TicTacToe() {
			GraphicsSettings.Initialize(this);
			Table.Initialize(3,3); //! Hardcode
			Input.MouseStateAux = Mouse.GetState();
		}
		
		protected override void LoadContent() {
			Debug.Assert(GraphicsDevice != null, "GraphicsDevice != null");
			Debug.Assert(Content  != null, "Content != null");		
			AssetsManager.Initialize(this);
			Table.Corner = Table.Centralize - Size.Grid* (Table.Rows * 0.5f); // Compreender este calculo
		}

		protected override void Draw(GameTime gameTime) {
			GraphicsDevice.Clear(Color.Black);
			GameLogicLayer.DrawPlayGame();
			base.Draw(gameTime);
		}
				
		protected override void Update(GameTime gameTime) {
			GameLogicLayer.UpdatePlayGame(this);
			base.Update(gameTime);
		}
			

	}
}